﻿namespace XGameLibrary.Controls
{
    using Microsoft.Xna.Framework;
    using Microsoft.Xna.Framework.Graphics;

    public class QuestionBox : Control
    {
        private LinkLabel[] options;

        public QuestionBox(Texture2D image, Label text, LinkLabel[] options = null)
        {
            this.Image = image;
            this.Rectangle = new Rectangle(
                (1280 - image.Width) / 2,
                (720 - image.Height) / 2,
                image.Width,
                image.Height);
            this.Color = Color.White;
            this.Question = text;
            this.options = options;
        }

        public static Texture2D Tinter { get; set; }

        public Texture2D Image { get; set; }

        public Rectangle Rectangle { get; set; }

        public Label Question { get; set; }

        public override void Update(GameTime gameTime)
        {
        }

        public override void Draw(SpriteBatch spriteBatch)
        {
            float x = 425;
            float y = 340;

            spriteBatch.Draw(
                QuestionBox.Tinter,
                new Rectangle(0, 0, 1280, 720),
                Color.Black);

            spriteBatch.Draw(
                this.Image,
                this.Rectangle,
                this.Color);

            this.Question.Position = new Vector2(
                x,
                y);
            this.Question.Draw(spriteBatch);
        }

        public override void HandleInput()
        {
        }
    }
}
